﻿@*
    For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>layui在线调试</title>
    <link href="~/layui/css/layui.css" rel="stylesheet" />
</head>
<body>
    <form class="layui-form" action="/CarryContract/CreateCarry" lay-filter="example">
        <div class="layui-form-item">
            <div style="float:left">
                <label class="layui-form-label">合同标题：</label>
                <div class="layui-input-block">
                    <input type="text" name="ContractTitle" id="ContractTitle" lay-verify="contractTitle" autocomplete="off" placeholder="请输入标题" class="layui-input">
                </div>
            </div>
            <div style="float:left">
                <label class="layui-form-label">承运单位：</label>
                <div class="layui-input-block">
                    <select name="OutsourcingUnit" lay-filter="outsourcingUnit">
                        <option value="" selected=""></option>
                        <option value="1">广州禾誉物流有限公司</option>
                        @*<option value="2">阅读</option>
                        <option value="3">游戏</option>
                        <option value="4">音乐</option>
                        <option value="5">旅行</option>*@
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div style="float:left">
               <label class="layui-form-label">负责人：</label>
                <div class="layui-input-block">
                    <select name="OutsourcingLeader" lay-filter="outsourcingLeader">
                        <option value="" selected=""></option>
                        <option value="1">张小刚</option>
                        <option value="3">王勇振</option>
                    </select>
                </div>
            </div>
            <div style="float:left">
                <label class="layui-form-label">线路：</label>
                <div class="layui-input-block">
                    <select name="Line" lay-filter="line">
                        <option value="" selected=""></option>
                        <option value="1">车线名称2</option>
                        <option value="7">1008611</option>
                    </select>
                </div>
            </div>
         </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">吨运价</label>
                <div class="layui-input-inline">
                    <input type="tel" name="Freightrate" lay-verify="required | Number" lay-reqtext="吨运价是必填项，岂能为空？"  autocomplete="off" class="layui-input" placeholder="请输入吨运价">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">包车条件吨位</label>
                <div class="layui-input-inline">
                    <input type="text" name="CharterConditions" lay-verify="required | Number" lay-reqtext="包车条件吨位是必填项，岂能为空？"  autocomplete="off" class="layui-input" placeholder="请输入包车条件吨位">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">包车金额：</label>
                <div class="layui-input-block">
                    <input type="text" name="CharterAmount" lay-verify="required | Number" lay-reqtext="包车金额是必填项，岂能为空？"  autocomplete="off" placeholder="请输入包车金额" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">经办人</label>
                <div class="layui-input-inline">
                    <input type="tel" name="Handler" lay-verify="required" autocomplete="off" class="layui-input" placeholder="请输入经办人">
                </div>
            </div>
        </div>
        <div class="layui-inline">
                <label class="layui-form-label">签订时间</label>
                <div class="layui-input-inline">
                    <input type="text" name="SigningDate" id="SigningDate" lay-verify="date" autocomplete="off" class="layui-input" placeholder="年/月/日">
                </div>
            </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">合同标的或项目说明</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" name="ProjectDescription" class="layui-textarea"></textarea>
            </div>
        </div>
         <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">合同主要条款/变更条款</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" name="ChangeClause" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">上传文件</label>
            <button type="button" class="layui-btn" id="test3"><i class="layui-icon"></i>上传文件</button>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary" >重置</button>
                <button class="layui-btn layui-btn-primary" onclick="location.href='/CarryContract/Index'">返回</button>
            </div>
        </div>
    </form>
    <script src="~/libs/jquery/jquery.js"></script>
    <script src="~/layui/layui.js" charset="utf-8"></script>

    <script>
        layui.use(['form', 'layedit', 'laydate','upload'], function(){
          var form = layui.form
          ,layer = layui.layer
          ,layedit = layui.layedit
          ,laydate = layui.laydate
          ,upload = layui.upload
          ,element = layui.element;

          //日期
          laydate.render({
            elem: '#SigningDate'
          });
          form.render();
          //监听提交
          form.on('submit(demo1)', function(data){
          });
          //指定允许上传的文件类型
          upload.render({
            elem: '#test3'
            ,url: '/CarryContract/FileUpload' //此处配置你自己的上传接口即可
            ,accept: 'file' //普通文件
            ,done: function(res){
              layer.msg('上传成功');
              console.log(res);
            }
          });
        });
    </script>
</body>
</html>